﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GSdk.Net.Lglcd;
using System.Drawing;
using System.Drawing.Imaging;

namespace GSdk.Shared
{
    [Obsolete("Use GSdk.Shared.Windows namespace to build GUIs")]
    public static class GraphicHelpers
    {
        public static void CreateBasicQvgaInterface(Graphics graphic, Font font, Bitmap background, Bitmap icon, string appname)
        {
            Graphics g;
            g = graphic;
                // Build header
                g.DrawImage(background, 0, 0, background.Width, background.Height);
                g.DrawImage(Properties.Resources.qvga_header, 0, 0, Properties.Resources.qvga_header.Width, Properties.Resources.qvga_header.Height);
                g.DrawImage(icon, 3, 3, icon.Width, icon.Height);
                g.DrawString(
                        appname,
                        font,
                        Brushes.Black,
                        30.0f,
                        5.0f
                    );
                g.DrawString(
                    appname,
                    font,
                    Brushes.White,
                    29.0f,
                    4.0f
                );
            g.Flush();
        }

        public static void CreateBasicBwInterface(Graphics graphic, Font font, string appname)
        {
            Graphics g;
            g = graphic;
                // Set image as white
                g.FillRectangle(Brushes.White, 0, 0, 160, 43);
                // Text
                g.DrawString(
                    appname.ToUpper(),
                    font,
                    Brushes.Black,
                    0.0f,
                    0.0f
                );
            g.Flush();
        }
    }
}
